package com.h.heal.mapper;

import com.h.heal.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

@Mapper
@Component
public interface AdminMapper {
    @Select("SELECT * FROM `admin` where admin_name=#{admin_name} and admin_pwd=#{admin_pwd}")
    Admin findByNameAndPwd(@Param("admin_name") String admin_name, @Param("admin_pwd") String admin_pwd);

    @Select("SELECT * FROM `admin` where admin_name=#{admin_name}")
    Admin findByName(@Param("admin_name")String admin_name);
}
